<template>
	<view class="search">
		<view class="search-header">
			<view class="search-box u-flex">
				<view class="u-flex search-input">
				  <u-icon name="search" color="#9F9F9F" size="36"></u-icon>
				  <u-input placeholder="请输入关键字" style="padding-left:30rpx"></u-input>
				</view>
				  <view class="cancel-btn" @click="cancelSearch">取消</view>
			</view>
		</view>
		<view class="search-result">
			<!-- 联系人 -->
			<view>
			 <view class="result-header">联系人</view>
			 <movable-area class="t-conversation-item-container note-section" v-for="(item,index) in 2" :key="index">
				<movable-view class="t-conversation-item" direction="horizontal" @click="$goPage('/staff/imSearch/detail')"
					damping="100">
					<view class="avatar-box">
						<image class="t-conversation-item-avatar" src="/static/images/avatar.jpg">
						</image>
					</view>
					<view class="t-conversation-item-content" :class="index == 1 ? 'no-border': ''">
						<label class="tui-result-name"><text style="color: #0089FF">好的</text>新生</label>
					</view>
				</movable-view>
			 </movable-area>
			</view>
			<!-- 群聊 -->
			<view class="result-type">
				<view class="result-header">群聊</view>
			<view style="width:100%;height: 12rpx;background-color: #fff;"></view>
			 <movable-area class="t-conversation-item-container note-section" v-for="(item,index) in 3" :key="index">
				<movable-view class="t-conversation-item" direction="horizontal" @click="$goPage('/staff/imSearch/detail')"
					damping="100">
					<view class="avatar-box">
						<image class="t-conversation-item-avatar" src="/static/images/avatar.jpg">
						</image>
					</view>
					<view class="t-conversation-item-content" :class="index == 2 ? 'no-border h-150': ''">
						<view class="tui-result-name"><text style="color: #0089FF">好的</text>新生</view>
						<view class="tui-result-message">包含：生活还是很美<text style="color: #0089FF">好的</text></view>
					</view>
				</movable-view>
			</movable-area>
		<view style="width:100%;height: 20rpx;background-color: #fff;"></view>
			</view>

			<!-- 聊天记录 -->
			<view class="result-type">
				<view class="result-header">聊天记录</view>
				<view style="width:100%;height: 12rpx;background-color: #fff;"></view>
			 <movable-area class="t-conversation-item-container note-section" v-for="(item,index) in 2" :key="index">
				<movable-view class="t-conversation-item" direction="horizontal" @click="$goPage('/staff/imSearch/detail')"
					damping="100">
					<view class="avatar-box">
						<image class="t-conversation-item-avatar" src="/static/images/avatar.jpg">
						</image>
					</view>
					<view class="t-conversation-item-content">
						<view class="tui-result-name">Abby</view>
						<view class="tui-result-message">12条相关记录</view>
					</view>
				</movable-view>
			</movable-area>
			<view class="more-chat-history" @click="$goPage('/staff/imSearch/moreHistoryDetail')">
				<view>
				  <u-icon name="search" size="30" color="#5B97C9"></u-icon>
				  <text class="more-chat-history-text">更多聊天记录</text>
				</view>
				<u-icon name="arrow-right" size="30" color="#949C9E"></u-icon>
			</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword:''
			}
		},
		methods: {
			cancelSearch(){
				uni.navigateBack({
					
				})
		}
	},
	}
</script>

<style lang="scss" scoped>
.search {
		white-space: normal;
		word-break: break-all;
		margin-top: 60rpx;
	}
.search-header {
		padding: 30rpx;
	}
	.search-box {
		justify-content: space-between;
	}
	.search-input {
		padding: 0 10rpx 0 20rpx;
		border-radius: 16rpx;
		background-color: #fff;
		flex:1;
		margin-left: 10rpx;
	}
	.cancel-btn {
		padding: 0 10rpx 0 28rpx;
		font-size: 32rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #3681C0;
	}
	.result-header {
		font-size: 28rpx;
		font-family: Adobe Heiti Std;
		font-weight: normal;
		color: #8D8D8D;
		padding: 20rpx 0 20rpx 40rpx;
		background-color: #fff;
		border-bottom: 1px solid #eaedec;
	}
	.no-border {
		border: none 
	}
.t-conversation-item-container {
  width: 100vw;
  height: 114rpx;
  background-color: #FFFFFF;
	&:first-child{
		padding-top: 32rpx;
	}
}
.result-type {
  margin-top:16rpx;
}
.t-conversation-item {
  width: 100vw;
  height: 114rpx;
  display: flex;
  left: 0;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
	padding-left: 10rpx;
}
.avatar-box{
  position: relative;
  display: inline-flex;
}
.t-conversation-item-avatar{
  position: relative;
  width: 72rpx;
  height: 72rpx;
  border-radius: 16rpx;
  /*padding-left: 40rpx;*/
  /*padding-right: 24rpx;*/
  /*padding-bottom: 28rpx;*/
  /*padding-top: 28rpx;*/
  margin: 0 14rpx 0 28rpx;
  overflow: auto;
}
.t-conversation-item-content {
  flex: 1;
  padding-left: 10rpx;
	margin-left: 16rpx;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 114rpx;
	border-bottom: 2rpx solid #EEF0F3;
}
.tui-result-name {
	font-size: 32rpx;
	font-family: Adobe Heiti Std;
	font-weight: normal;
	color: #131313;
}
.tui-result-message {
	font-size: 27rpx;
	font-family: Adobe Heiti Std;
	font-weight: normal;
	color: #98A0A1;
	line-height: 30rpx;
}
.more-chat-history {
	display: flex;
	justify-content: space-between;
	background-color: #fff;
	padding: 20rpx 28rpx 20rpx 36rpx;
	.more-chat-history-text {
		font-size: 28rpx;
		font-family: Adobe Heiti Std;
		font-weight: normal;
		color: #5B97C9;
		margin-left: 20rpx;
	}
}
</style>
